﻿<Page x:Class="PhotosPage2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:winforms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
    xmlns:vemap="clr-namespace:SpatialAlbum.VirtualEarthMap;assembly=SpatialAlbum.VirtualEarthMap"
    xmlns:my="clr-namespace:SpatialAlbum.WPF"
    Title="Photos">
    <DockPanel Style="{StaticResource AppFont}">
        <StackPanel DockPanel.Dock="Top">
            <TextBlock Style="{StaticResource PageTitle}">PhotosPage2</TextBlock>

            <my:MyPanel Height="100" Width="400" Background="Azure" Visibility="Collapsed">
                <TextBox>HELLO</TextBox>
                <TextBox>AGAIN</TextBox>
                <my:MyBorder Major="True">
                    <TextBlock>Text in MyBorder</TextBlock>
                </my:MyBorder>
                <my:MyBorder Major="False">
                    <TextBlock>Text in MyBorder</TextBlock>
                </my:MyBorder>
            </my:MyPanel>
        </StackPanel>
        <my:AlbumSelectorControl DockPanel.Dock="Bottom" x:Name="AlbumSelectorControl1" Height="50" Width="350"/>

        <Border BorderBrush="Blue" BorderThickness="5">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <my:MyGridCell Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <my:MapViewControl x:Name="MapViewControl1"/>
                </my:MyGridCell>
                <my:MyGridCell Grid.Row="1" Grid.Column="0">
                        <my:DatabaseGridControl x:Name="DatabaseGridControl1"/>
                </my:MyGridCell>
                <my:MyGridCell Grid.Row="1" Grid.Column="1">
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center" Width="300" Height="100">
                        MAJOR Image View... nothing here yet...
                    </Label>
                </my:MyGridCell>
            </Grid>
        </Border>


        <Border BorderBrush="Yellow" BorderThickness="2" Visibility="Collapsed">
            <Canvas Name="Canvas1" IsHitTestVisible="True" ClipToBounds="True">
                <my:MyBorder x:Name="Image2" Major="False" Canvas.Top="2" Canvas.Left="90">
                    <Canvas Width="100" Height="100">
                        <Label>MINOR</Label>
                    </Canvas>
                </my:MyBorder>
                <my:MyBorder x:Name="Image" Canvas.Top="2" Canvas.Left="10" Major="True" BorderBrush="Red" BorderThickness="5,20,5,5" Background="AliceBlue">
                    <Label VerticalAlignment="Center" HorizontalAlignment="Center" Width="300" Height="100">
                        MAJOR Image View... nothing here yet...
                    </Label>
                    <!--<Border.Triggers>
                        <EventTrigger RoutedEvent="Border.Loaded">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation
                                        BeginTime="0:0:00"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                        From="1" To="0.1" Duration="0:0:02"
                                    />
                                    <DoubleAnimation
                                        BeginTime="0:0:01"
                                        Storyboard.TargetProperty="(Canvas.Top)"
                                        From="0" To="100" Duration="0:0:05"
                                        />
                                    <DoubleAnimation
                                        BeginTime="0:0:01"
                                        Storyboard.TargetProperty="(Canvas.Left)"
                                        From="0" To="100" Duration="0:0:05"
                                        />
                                    <DoubleAnimation
                                        BeginTime="0:0:05"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                        From="0.1" To="1" Duration="0:0:02"
                                    />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Border.Triggers>-->
                </my:MyBorder>

                <TextBlock x:Name="anitext" Text="animated text" Height="18" Canvas.Left="350" Canvas.Top="10"> 
                    <TextBlock.Triggers>
                        <EventTrigger RoutedEvent="TextBlock.Loaded">
                            <BeginStoryboard>
                                <Storyboard Storyboard.TargetName="anitext">
                                    <DoubleAnimation
                                        BeginTime="0:0:09"
                                        Storyboard.TargetProperty="(Canvas.Top)"
                                        From="10" To="110" Duration="0:0:0.2" AutoReverse="True"/>
                                    <StringAnimationUsingKeyFrames 
                                        Storyboard.TargetName="anitext" Storyboard.TargetProperty="(TextBlock.Text)"
                                        Duration="0:0:8" FillBehavior="HoldEnd">
                                        <DiscreteStringKeyFrame Value="" KeyTime="0:0:0" />
                                        <DiscreteStringKeyFrame Value="A" KeyTime="0:0:1" />
                                        <DiscreteStringKeyFrame Value="An" KeyTime="0:0:1.5" />
                                        <DiscreteStringKeyFrame Value="Ani" KeyTime="0:0:2" />
                                        <DiscreteStringKeyFrame Value="Anim" KeyTime="0:0:2.5" />
                                        <DiscreteStringKeyFrame Value="Anima" KeyTime="0:0:3" />
                                        <DiscreteStringKeyFrame Value="Animat" KeyTime="0:0:3.5" />
                                        <DiscreteStringKeyFrame Value="Animate" KeyTime="0:0:4" />
                                        <DiscreteStringKeyFrame Value="Animated" KeyTime="0:0:4.5" />
                                        <DiscreteStringKeyFrame Value="Animated " KeyTime="0:0:5" />
                                        <DiscreteStringKeyFrame Value="Animated T" KeyTime="0:0:5.5" />
                                        <DiscreteStringKeyFrame Value="Animated Te" KeyTime="0:0:6" />
                                        <DiscreteStringKeyFrame Value="Animated Tex" KeyTime="0:0:6.5" />
                                        <DiscreteStringKeyFrame Value="Animated Text" KeyTime="0:0:7" />
                                      </StringAnimationUsingKeyFrames>              
                                    </Storyboard>

                            </BeginStoryboard>
                        </EventTrigger>
                    </TextBlock.Triggers>
                </TextBlock>
            </Canvas>
        </Border>
    </DockPanel>
</Page>
